package com.dekarrin.scraton;

import com.dekarrin.util.StringPadder;

public class TransitionLine extends ScriptInstruction {

	/**
	 * Whether this transition splits two scenes.
	 */
	private boolean crossScene;
	
	/**
	 * The name of the transition.
	 */
	private String transition;
	
	public TransitionLine(long timestamp, ScriptFormat format, String transition, boolean crossScene) {
		super(timestamp, format);
		this.transition = transition.toUpperCase();
		this.crossScene = crossScene;
	}
	
	public String toString() {
		String str = transition;
		if (crossScene) {
			StringPadder padder = new StringPadder(format.scriptWidth, " ");
			str = padder.padLeft(str + ":");
		}
		str += "\n\n";
		return str;
	}

}